package com.ruoyi.InboundManagement.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.InboundManagement.mapper.MaterialReturnInboundMapper;
import com.ruoyi.InboundManagement.domain.MaterialReturnInbound;
import com.ruoyi.InboundManagement.service.IMaterialReturnInboundService;

/**
 * 退料入库管理Service业务层处理
 * 
 * @author admin
 * @date 2024-07-02
 */
@Service
public class MaterialReturnInboundServiceImpl implements IMaterialReturnInboundService 
{
    @Autowired
    private MaterialReturnInboundMapper materialReturnInboundMapper;

    /**
     * 查询退料入库管理
     * 
     * @param returnId 退料入库管理主键
     * @return 退料入库管理
     */
    @Override
    public MaterialReturnInbound selectMaterialReturnInboundByReturnId(Long returnId)
    {
        return materialReturnInboundMapper.selectMaterialReturnInboundByReturnId(returnId);
    }

    /**
     * 查询退料入库管理列表
     * 
     * @param materialReturnInbound 退料入库管理
     * @return 退料入库管理
     */
    @Override
    public List<MaterialReturnInbound> selectMaterialReturnInboundList(MaterialReturnInbound materialReturnInbound)
    {
        return materialReturnInboundMapper.selectMaterialReturnInboundList(materialReturnInbound);
    }

    /**
     * 新增退料入库管理
     * 
     * @param materialReturnInbound 退料入库管理
     * @return 结果
     */
    @Override
    public int insertMaterialReturnInbound(MaterialReturnInbound materialReturnInbound)
    {
        materialReturnInbound.setCreateTime(new Date());
        return materialReturnInboundMapper.insertMaterialReturnInbound(materialReturnInbound);
    }

    /**
     * 修改退料入库管理
     * 
     * @param materialReturnInbound 退料入库管理
     * @return 结果
     */
    @Override
    public int updateMaterialReturnInbound(MaterialReturnInbound materialReturnInbound)
    {
        return materialReturnInboundMapper.updateMaterialReturnInbound(materialReturnInbound);
    }

    /**
     * 批量删除退料入库管理
     * 
     * @param returnIds 需要删除的退料入库管理主键
     * @return 结果
     */
    @Override
    public int deleteMaterialReturnInboundByReturnIds(Long[] returnIds)
    {
        return materialReturnInboundMapper.deleteMaterialReturnInboundByReturnIds(returnIds);
    }

    /**
     * 删除退料入库管理信息
     * 
     * @param returnId 退料入库管理主键
     * @return 结果
     */
    @Override
    public int deleteMaterialReturnInboundByReturnId(Long returnId)
    {
        return materialReturnInboundMapper.deleteMaterialReturnInboundByReturnId(returnId);
    }

}

